package cn.com.self.apis.file.service.intf;

import cn.com.self.apis.file.entity.Files;
import cn.com.selfsoft.smartcity.core.service.GenericService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface IFileService extends GenericService<Files, String, Files> {

    Map<String, Object> uploadByUrl(String urlPath, String path, String fileType) throws Exception;

    void download(HttpServletResponse response, String filePath, String fileType, String fileName) throws IOException;

    public void saveFile(Map<String, String> map);

    List<Files> findAllFiles();

    /**
     * 上传文件接口
     *
     * @param request request
     * @return return
     */
    Files upload(HttpServletRequest request);

    /**
     * 批量上传文件接口
     *
     * @param request request
     * @return return
     */
    List<Files> uploads(HttpServletRequest request);

}
